package com.loong.data.controller.forehead;

import com.loong.common.mvc.BaseForeheadController;
import com.loong.common.rest.Result;
import com.loong.data.common.forehead.param.GoodsSpecificationAndPageForeheadParam;
import com.loong.data.handler.GoodsSpecificationHandler;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @Description:
 * @Author: hzp
 * @Date: 2020-12-5 14:07
 */
@Slf4j
@RestController
@RequestMapping("forehead/data/goodsSpecification")
public class GoodsSpecificationForeheadController extends BaseForeheadController {

    @Resource
    private GoodsSpecificationHandler goodsSpecificationHandler;
    /**
     * 多条件分页查询店铺规格
     * @param param 多条件查询参数：店铺规格、分页封装的参数
     * @return 响应的结果
     */
//    @PostMapping("findGoodsSpecificationList")
//    public Result pageQueryGoodsSpecificationModel(@RequestBody GoodsSpecificationAndPageForeheadParam param){
//        return handlerExecutor.execute(() -> goodsSpecificationHandler.commonPageQueryGoodsSpecification(param));
//    }

    @PostMapping("findGoodsSpecificationList")
    public Result pageQueryGoodsSpecificationForeheadResult(@RequestBody GoodsSpecificationAndPageForeheadParam param){
        return handlerExecutor.execute(() -> goodsSpecificationHandler.findGoodsSpecificationForeheadResult(param));
    }

}
